package com.sn.pw.page;

import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.Collections;
import java.util.List;

@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class PageResp<T> implements Serializable {

    private static final long serialVersionUID = 5679018624309023727L;

    @ApiModelProperty(value = "当前页码", name = "page", example = "1")
    private int page = 1;

    @ApiModelProperty(value = "总页码", name = "pageTotal", example = "0")
    private int pageTotal = 0;

    @ApiModelProperty(value = "总条数", name = "rowsTotal", example = "0")
    private long rowsTotal = 0;

    @ApiModelProperty(value = "每页显示条数", name = "rows", example = "10")
    private int row = 10;

    @ApiModelProperty(value = "每页显示条数", name = "list")
    public List<T> list = Collections.emptyList();
}
